%%%%%standard errors
[mergers,subs,maxs,Omega]=equilibrium(sigmaS,sigmaT,N,T,lambda1,lambda2,q_team,q_sp,nScore,Svalues,mergers_data,nSim);

G=zeros(2,2);
epsilonT=1e-2;
epsilonS=1e-2;
L=[(mergers-mergers_data)/mergers_data;(subs-nsubs_data)/nsubs_data];
[m1,s1,~,~]=equilibrium(sigmaS,sigmaT+epsilonT,N,T,lambda1,lambda2,q_team,q_sp,nScore,Svalues,mergers_data,nSim);
L1=[(m1-mergers_data)/mergers_data;(s1-nsubs_data)/nsubs_data];
G(:,1)=[L1-L]/(epsilonT);
[m1,s1,~,~]=equilibrium(sigmaS+epsilonS,sigmaT,N,T,lambda1,lambda2,q_team,q_sp,nScore,Svalues,mergers_data,nSim);
L1=[(m1-mergers_data)/mergers_data;(s1-nsubs_data)/nsubs_data];
G(:,2)=[L1-L]/(eps);
VarCov=(inv(G'*G)*G'*(L*L')*G*inv(G'*G));
StErrorSigma=diag(VarCov/nsubs_data).^0.5
[[sigmaT;sigmaS],StErrorSigma]
